<template>
 <div>
     <h2>添加演员</h2>
     姓名：<input type="text" v-model="name">
     <button @click="sub">添加</button>
 </div>
</template>

<script>
 export default {
   data () {
     return {
         name:''
     }
   },
   methods: {
       sub(){
           let formdata=new FormData();
           formdata.append("name",this.name);
           this.axios({
               url:'http://127.0.0.1:8000/app01/actor/',
               method:'post',
               data:formdata
           }).then(res=>{
               console.log(res)
           })
       }
   }
 }
</script>

<style>

 
</style>
